package com.wonghiu.provider;

import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import com.wonghiu.provider.util.SpringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

/**
 * @Author wonghiu
 * @Date 2021/8/11 16:30
 * @Version 1.0.1
 */
//@SpringBootApplication
//@EnableDubboConfiguration
public class DubboProviderMain {
    //    public static void main(String[] args) throws IOException {
//        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(DubboProviderMain.class);
//        Object helloServiceImp = applicationContext.getBean("helloServiceDubboImp");
//        System.out.println(helloServiceImp);
//        System.in.read();
//    }
    public static void main(String[] args) {
        SpringApplication.run(DubboProviderMain.class, args);
        Object checkService = SpringUtils.getBean("helloServiceDubboImp");
        System.out.println(checkService.toString());
    }
}
